package com.qeado.common.helper;

import java.util.Enumeration;

import javax.servlet.http.HttpServletRequest;

public class AttributeHelper {
	@SuppressWarnings("unchecked")
	public static void removeSessionAttribute(HttpServletRequest request, String alias) {
		Enumeration<String> enumeration = request.getSession().getAttributeNames();
        while(enumeration.hasMoreElements()){
            String key = enumeration.nextElement();
            if(key.startsWith(alias)){
                request.getSession().removeAttribute(key);
            }
        }
	}

}
